home *** CD-ROM | disk | FTP | other *** search
-
- #include <dos.h>
- #include <clib/alib_protos.h>
- #include <proto/dos.h>
- #include <proto/asl.h>
- #include <proto/exec.h>
- #include <proto/utility.h>
- #include <proto/diskfont.h>
- #include <proto/gadtools.h>
- #include <proto/graphics.h>
- #include <proto/intuition.h>
- #include <proto/datatypes.h>
-
- /* possible later to add also an ARexx port -
- I am lazy and so I prepare this here already :-) */
-
- #ifdef AREXX
- #include <proto/rexxsyslib.h>
- #endif
-
- #include <dos/exall.h>
- #include <dos/dostags.h>
- #include <exec/memory.h>
- #include <exec/execbase.h>
- #include <graphics/scale.h>
- #include <libraries/gadtools.h>
- #include <intuition/gadgetclass.h>
- #include <datatypes/pictureclass.h>
-
-
- /* CatComp should use numbers to address the strings */
-
- #define CATCOMP_NUMBERS
- #include "includes/buildin.strings"
-
-
- /* Yep..., we are creating a module ... */
-
- #define _DOPUS_MODULE_DEF
- #include <dopus/modules.h>
-
-
- /* We do not use any stuff from string.h or stdlib.h ... */
- /* I use the replacements instead, thanks to Dirk Stoecker */
- /* See sdi_std.h for more info */
-
- #define SDI_TO_ANSI
- #include <sdi_std.h>
-
- /********************************************************************/
-
- #include "includes/Clock_IPC.h"
-
- /********************************************************************/
-
- #define VERSION_STRING "Time.module 1.03 © Helmut Hummel"
-
- #define COMMAND_0 "CoolClock"
-
- #define CMD_0_TEMPL "LE=LeftEdge/N,TE=TopEdge/N,AD=AutostartDelay/N,Font/K,FS=Fontsize/N,FP=FrontPen/N,BP=BackPen/N,TM=TextMode/K,TS=TextStyle/K,Plain/S,T=Transparent/S,Pic=Picture/K,B=Border/K,Alarm/K,Sound/K,Quit/S"
-
- #define CLOCKARG_COUNT 15
-
- #define ARG_LEFT fargs->FA_Arguments[0]
- #define ARG_TOP fargs->FA_Arguments[1]
- #define ARG_DELAY fargs->FA_Arguments[2]
- #define ARG_FONT fargs->FA_Arguments[3]
- #define ARG_SIZE fargs->FA_Arguments[4]
- #define ARG_APEN fargs->FA_Arguments[5]
- #define ARG_BPEN fargs->FA_Arguments[6]
- #define ARG_MODE fargs->FA_Arguments[7]
- #define ARG_STYLE fargs->FA_Arguments[8]
- #define ARG_PLAIN fargs->FA_Arguments[9]
- #define ARG_TRANS fargs->FA_Arguments[10]
- #define ARG_PIC fargs->FA_Arguments[11]
- #define ARG_BORDER fargs->FA_Arguments[12]
- #define ARG_ALARM fargs->FA_Arguments[13]
- #define ARG_SOUND fargs->FA_Arguments[14]
- #define ARG_QUIT fargs->FA_Arguments[15]
-
- #define CLOCKCONFIG "DOpus5:Settings/CoolClock.prefs"
- #define CLOCKSTARTVAR "dopus/CoolClock"
- #define ALARM_SCRIPT "DOpus5:System/CoolClock.scp"
-
-
- /* The "subtemplates" */
-
- #define MODE_TEMPL "JAM1/S,JAM2/S,CPL=COMPLEMENT/S,INV=INVERSVID/S"
- #define STYLE_TEMPL "NORMAL/S,UL=UNDERLINE/S,BOLD/S,ITALIC/S"
- #define ON_OFF_TEMPL "1/S,ON/S,TRUE/S,YES/S,0/S,OFF/S,FALSE/S,NO/S"
-
- #define NO_CASE 1 << 4
-
- /********************************************************************/
-
- /* we need a structure to pass all data to the main process */
-
- typedef struct
- {
- struct IBox ibox;
- ULONG flags;
- struct TextAttr txtattr;
- char alarm[8];
- char fontname[32];
- char picture[256];
- } CPrefsData;
-
-
-
- typedef struct
- {
- ULONG startdata;
- ULONG a4;
- struct Library *library;
- struct Library *module;
- IPCData *ipc;
- struct Window *win;
- ObjectList *olist;
- struct Gadget *gad;
-
- } StartupData;
-
-
- #define FLG_ENABLED 1 << 0
-
-
- /********************************************************************/
- // GLOBAL POINTERS
-
- /* from the modinit.c */
-
- extern APTR mempool;
-
-
- /* from the clock itself */
- /* since this pointer is for each process read-only, */
- /* it must not be protected within a semaphore */
-
- extern IPCData *clock_ipc;
-
- /* we "steal" something from the GST ... */
- extern char *strcat( char *, char *);
-
-